//
//  BaiduViewController.m
//  ZBaiduDemo
//
//  Created by 周成龙 on 16/10/26.
//  Copyright © 2016年 ZCL. All rights reserved.
//

#import "BaiduViewController.h"

#import "BaiduMapHeader.h"

@interface BaiduViewController ()<BMKMapViewDelegate>

@property (nonatomic, strong) BMKMapView* mapView;


@end

@implementation BaiduViewController

- (BMKMapView *)mapView {
    if (_mapView == nil) {
        _mapView = [[BMKMapView alloc] initWithFrame:self.view.bounds];
    }
    return _mapView;
}

- (void)viewWillAppear:(BOOL)animated
{
    [_mapView viewWillAppear];
    _mapView.delegate = self;
}
- (void)viewWillDisappear:(BOOL)animated
{
    [_mapView viewWillDisappear];
    _mapView.delegate = nil;
}


- (void)viewDidLoad {
    [super viewDidLoad];
    self.automaticallyAdjustsScrollViewInsets = NO;
    
    [self.view addSubview:self.mapView];
}



@end
